package o;

import com.huawei.gamebox.plugin.gameservice.db.tables.GameNoticeRecord;
import java.util.List;

public class ezf {
    private static final String ˋ = GameNoticeRecord.class.getSimpleName();
    private static ezf ˎ = null;
    private cfu ॱ = euc.ˊ().ʽ(ˋ);

    private ezf() {
    }

    public static synchronized ezf ˊ() {
        ezf o_ezf;
        synchronized (ezf.class) {
            if (ˎ == null) {
                ˎ = new ezf();
            }
            o_ezf = ˎ;
        }
        return o_ezf;
    }

    public int ˎ(GameNoticeRecord gameNoticeRecord) {
        return this.ॱ.ॱ(gameNoticeRecord, "appId_=?", new String[]{gameNoticeRecord.ʻ()});
    }

    public void ˏ(GameNoticeRecord gameNoticeRecord) {
        if (!dof.ॱ(gameNoticeRecord.ʻ()) && ((long) ˎ(gameNoticeRecord)) <= 0) {
            this.ॱ.ˎ(gameNoticeRecord);
        }
    }

    public GameNoticeRecord ˎ(String str) {
        List ˋ = this.ॱ.ˋ(GameNoticeRecord.class, "appId_=?", new String[]{str}, null, null);
        if (ˋ == null || ˋ.isEmpty()) {
            return null;
        }
        return (GameNoticeRecord) ˋ.get(0);
    }
}
